<%--
  Created by IntelliJ IDEA.
  User: bboy-lwj
  Date: 2023/4/25
  Time: 8:35
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
  <head>
    <title>首页</title>
  </head>
  <body>
    <a href="html/register.html">注册</a>
    <a href="html/login.html">登陆</a>
  <%
        Object name= session.getAttribute("user");
        if (name!=null)
        {%>
          欢迎
        <%  out.println((String)(name).toString());%>
          来到本站
        <%}else {
          response.sendRedirect("/register");
        }
  %>
  </body>
</html>
